import Video from '@/views/Video'
import ABPFooter from '@/components/ABPFooter'
import Home from '@/views/Home'
import Svideo from '@/views/Svideo'
import VideoCategory from '@/components/VideoCategory'
import Search from '@/views/Search'
const PageOfShow = () => import('@/views/PageOfShow')
const BuyTicket = () => import('@/views/BuyTicket')
const ShowOrder = () => import('@/views/ShowOrder')
const Mine = () => import('@/views/Mine/Mine')
const movieOrder = () => import('@/views/Mine/movieOrder')
const Login = () => import('@/views/Mine/Login')
const ShowVideoInfo = () => import('@/components/ShowVideoInfo')
const ShowSvideoInfo = () => import('@/components/ShowSvideoInfo')
const PayFor = () => import('@/components/pageofshow/PayFor')
const Register = () => import('@/views/Mine/Register')
const MovieDetail = () => import('@/views/MovieDetail')

const routes = [
  {
    path: '/',
    redirect: '/home',
    meta: {
      isBackShow: false,
      isTabbar: false
    }
  },
  {
    path: '/home',
    name: 'Home',
    components: {
      default: Home,
      abpfooter: ABPFooter
    },
    meta: {
      isBackShow: false,
      isTabbar: true
    }
  },
  {
    path: '/moviedetail',
    name: 'MovieDetail',
    components: {
      default: MovieDetail,
      abpfooter: ABPFooter
    },
    meta: {
      isBackShow: true,
      isTabbar: false
    }
  },
  {
    path: '/video',
    name: 'Video',
    components: {
      default: Video,
      abpfooter: ABPFooter
    },
    meta: {
      isBackShow: false,
      isTabbar: true
    },
    children: [
      {
        path: ':id',
        component: VideoCategory,
        meta: {
          isBackShow: false
        }
      }
    ]
  },
  {
    path: '/svideo',
    name: 'Svideo',
    components: {
      default: Svideo,
      abpfooter: ABPFooter
    },
    meta: {
      isBackShow: false,
      isTabbar: true
    }
  },
  {
    path: '/order',
    name: 'ShowOrder',
    component: ShowOrder,
    meta: {
      isBackShow: true,
      isTabbar: false
    }
  },
  {
    path: '/buyticket',
    name: 'BuyTicket',
    component: BuyTicket,
    meta: {
      isBackShow: true,
      isTabbar: false
    }
  },
  {
    path: '/pageofshow',
    name: 'PageOfShow',
    component: PageOfShow,
    meta: {
      isBackShow: true,
      isTabbar: true
    }
  },
  {
    path: '/mine',
    name: 'Mine',
    components: {
      default: Mine,
      abpfooter: ABPFooter
    },
    meta: {
      isPermission: true,
      isBackShow: false,
      isTabbar: true
    }
  },
  {
    path: '/movieorder',
    name: 'movieOrder',
    component: movieOrder,
    meta: {
      isBackShow: true,
      isTabbar: false
    }
  },
  {
    path: '/login',
    name: 'Login',
    components: {
      default: Login,
      abpfooter: ABPFooter
    },
    meta: {
      isBackShow: false,
      isTabbar: false
    }
  },
  {
    path: '/videoinfo',
    name: 'ShowVideoInfo',
    component: ShowVideoInfo,
    meta: {
      isBackShow: true,
      isTabbar: false
    }
  },
  {
    path: '/payfor',
    name: 'PayFor',
    component: PayFor,
    meta: {
      isBackShow: true,
      isTabbar: false
    }
  },
  {
    path: '/svideoinfo',
    name: 'ShowSvideoInfo',
    component: ShowSvideoInfo,
    meta: {
      isBackShow: true,
      isTabbar: false
    }
  },
  {
    path: '/register',
    name: 'Register',
    component: Register,
    meta: {
      isBackShow: true,
      isTabbar: false
    }
  },
  {
    path: '/search',
    name: 'Search',
    component: Search,
    meta: {
      isBackShow: true,
      isTabbar: false
    }
  }
]
export default routes
